package org.king.service;

import javafx.collections.ObservableList;
import org.king.entity.Activity;
import org.king.entity.vo.ActivityEntity;
import org.king.entity.vo.Comment;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

@Service
public interface ActivityService {
    //activity
    public ActivityEntity getActivity(int activityId);
    public ObservableList<ActivityEntity> getAllActivities();
    public ObservableList<ActivityEntity> getActivitiesByUserId(int userId);
    public int addActivity(Activity activity);
    public int deleteActivity(int activityId);
    public int updateActivity(Activity activity);
    public int getUserJoinActivity(int activityId,int userId);

    //user_join_activity
    public int addUserJoinActivity(int userId,int activityId);
    public int updateUserJoinActivityScore(int activityId,int userId,int score);
    public int deleteUserJoinActivity(int activityId,int userId);
    public ObservableList<ActivityEntity> getActivitiesByDate(LocalDate searchDate);
    int getParticipantCount(int activityId);
    double getAverageRating(int activityId);

    //comment
    public int insertComment(Comment comment);
    public int updateComment(String text, int CommentId);
    public List<Comment> getCommentsByActivity(int ActivityId);
}
